const Router = require('koa-router');
const {
    getBikeListByBrandId,
    getBikeDetailByBikeId,
    getBikeScoreRanKeList,
    getRecentlyUpdatedList,
    getIndividualizationList
} = require('../controller/appletBikeController')
const {appletAuth, wxAppletAuth} = require('../middleware/auth.middleware')

const appletBikeRouter = new Router({prefix: '/applet/bike'});

appletBikeRouter.get(`/list`, getBikeListByBrandId);

appletBikeRouter.get(`/scoreRanking/list`, getBikeScoreRanKeList); //评分排名列表

appletBikeRouter.get(`/recentlyUpdated/list`, getRecentlyUpdatedList); //最近上新列表

appletBikeRouter.get(`/individualization/list`, getIndividualizationList);  //个性化列表

appletBikeRouter.get(`/detail`, appletAuth, getBikeDetailByBikeId);

appletBikeRouter.get(`/wxDetail`, wxAppletAuth, getBikeDetailByBikeId);

module.exports = appletBikeRouter;
